package com.JFapp.eumns;

import javax.management.loading.MLetContent;
import java.net.BindException;

public enum AppHttpCodeEnum {

    /**
     * 系统全局枚举
     */
    SUCCESS (200,"操作成功"),
    REQUIRE_USERNAME(496, "必须填写用户名"),
    NO_OPERATOR_AUTH(497, "无权限"),
    LOGIN_ERROR(498, "登陆失败"),
    NEED_LOGIN(499, "需要登录"),
    USERNAME_EXIST (500,"用户已存在"),
    SYSTEM_ERROR(505, "系统错误"),
    VALID_ERROR(303,"参数校验失败" ),
    NOT_FIND_ROLE(304,"找不到角色，请检查" ),
    NOT_FIND_USER (304,"找不到用户，请检查"),

    /**
     * 订单枚举
     */
    REPAIR_CANCEL(2, "申请取消订单"),
    REPAIR_INFORM(506,"订单通知失败" ),
    NOT_FIND_REPAIR(507, "找不到订单"),
    IDEMPOTENT (508,"请勿重复审核"),
    SEND_EMAIL_FAIL(509,"邮件发送失败"),
    COMMENT_NO_NULL(510,"评论不能为空" ),
    FILE_TYPE_ERROR(511, "文件类型错误"),
    TAG_NAME_ERROR(521, "标签名称不能全部为空"),
    FILE_READ_ERROR(531, "文件读取失败"),
    SAVE_FAILURE(532,"保存失败" ),
    PID_ERROR(533,"父分类不可修改" ),
    ADD_ROLE_ERROR(534, "角色添加失败"),
    RANK_START_ERROR(535,"排名起始值应大于等于1" ),
    NOT_COMPLETE(536,"订单状态异常，提交完成失败" ),
    HAS_CHILD_MENU(537, "存在子菜单，不能删除"),
    PARENT_MENU_ERROR(538,"更新失败，上级菜单不能选择自己" );

    public static final String OUT_OF_TOKEN = "token过期";
    public static final String CHECK_PASSWORD = "请检查两次密码是否一致不为空";
    int code;
    String message;
    AppHttpCodeEnum(int code, String message) {
        this.code=code;
        this.message=message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
